package com.atguigu.lister.work;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by 小可乐$ on 2024/9/10$ 19:34$
 * description: 路由模式消费者
 */
@Component
public class RabbitMQLYListen {
    @RabbitListener(queues = {"atguigu.queue.direct"})//指定交换机
    public void processMessageRouting(String messageContent, Message message, Channel channel) {
        System.out.println("Message Content:" + messageContent);
    }
}
